package com.wakaka.service;

import com.wakaka.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Component
@FeignClient(value = "PROVIDER", fallbackFactory = DeptClientServerFallbackFactory.class)
public interface FeignService {
    @RequestMapping("/queryAll")
    List<Dept> queryAll();

    @RequestMapping("/get/{id}")
    Dept get(@PathVariable("id") long id);

    @RequestMapping("/add/{name}")
    public int add(@PathVariable("name") String name);
}
